using System;
using System.Collections.Generic;
using System.Text;
using Barrage.Meshes.Text;

namespace Barrage.Items._2D
{
    /// <summary>
    /// Simply an item with a TextMesh mesh
    /// </summary>
    public class BasicText:Item
    {
        TextMesh textMesh;
        /// <summary>
        /// Returns the text mesh associated to this item
        /// </summary>
        public TextMesh TextMesh { get { return textMesh; } }
        /// <summary>
        /// Gets/Sets the text that the mesh will show
        /// </summary>
        public string Text { get { return textMesh.Text; } set { textMesh.Text = value; } }

        /// <summary>
        /// Inits the text mesh and the item
        /// </summary>
        /// <param name="font">Font that the text mesh will use</param>
        public BasicText(BitmapFont font)            
        {
            textMesh = new TextMesh(font);
            addMesh(textMesh);
        }
    }
}
